package com.blueocean_health.care.management.domain.dto;

import java.text.ParseException;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;
import com.blueocean_health.care.management.common.base.em.TimeType;
import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.common.base.time.TimeUtils;
import com.blueocean_health.care.management.common.excel.ExcelResources;

/**
* @author huyanqiu
* @date 2017年12月12日 下午4:04:59
* @version 版本号：1.0
*/
public class NurseWorkerInfoHealthCertResponseDto {
	private Integer id;
	// 护工编号
	private String workerId;
	// 护工名称
	private String workerName;
	// 联系电话
	private String phone;
	// 健康证号
    private String healthCert;
	// 失效日期
    @JSONField(format = "yyyy-MM-dd")
	private Date healthCertExpiryDate;
	// 补办日期 = 失效日期 - 14
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
	private Date reissueDate;
	// 补办剩余有效天数 = 补办日期-当前时间
	private String days;
	// 提醒状态
	private String remindStatus;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@ExcelResources(title = "护工编号", order = 1)
	public String getWorkerId() {
		return workerId;
	}
	public void setWorkerId(String workerId) {
		this.workerId = workerId;
	}
	@ExcelResources(title = "护工姓名", order = 2)
	public String getWorkerName() {
		return workerName;
	}
	public void setWorkerName(String workerName) {
		this.workerName = workerName;
	}
	@ExcelResources(title = "联系电话", order = 3)
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@ExcelResources(title = "健康证编号", order = 4)
	public String getHealthCert() {
		return healthCert;
	}
	public void setHealthCert(String healthCert) {
		this.healthCert = healthCert;
	}
	public Date getHealthCertExpiryDate() {
		return healthCertExpiryDate;
	}
	
	@ExcelResources(title = "失效日期", order = 5)
	public String getHealthCertExpiryDateString() {
		if(StringUtils.isEmpty(healthCertExpiryDate)){
			return null;
		}
		return TimeUtils.getStringByDate(healthCertExpiryDate, TimeType.yyyy_MM_dd);
	}
	public void setHealthCertExpiryDate(Date healthCertExpiryDate) throws ParseException {
		this.healthCertExpiryDate = healthCertExpiryDate;
	}
	public Date getReissueDate() {
		return reissueDate;
	}
	@ExcelResources(title = "补办日期", order = 6)
	public String getReissueDateString() {
		if(StringUtils.isEmpty(reissueDate)){
			return null;
		}
		return TimeUtils.getStringByDate(reissueDate, TimeType.yyyy_MM_dd);
	}
	public void setReissueDate(Date reissueDate) {
		this.reissueDate = reissueDate;
	}
	@ExcelResources(title = "补办剩余天数", order = 7)
	public String getDays() {
		return days;
	}
	public void setDays(String days) {
		this.days = days;
	}
	@ExcelResources(title = "提醒状态", order = 8)
	public String getRemindStatus() {
		return remindStatus;
	}
	public void setRemindStatus(String remindStatus) {
		this.remindStatus = remindStatus;
	}
}
